package com.heima.article.job;

import com.heima.article.service.HotArticleSrevice;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RequiredArgsConstructor
public class ComputeHotArticleJob {

    private final HotArticleSrevice hotArticleSrevice;

    @XxlJob("computeHotArticleJob")
    public void handle(){

        log.info("热文章分值计算调度任务执行...");

        hotArticleSrevice.computeHotArticle();
    }

}
